package com.itheima.algorithm.binarytree;

/**
 * @author: TylerZhong
 * @description:
 */
public class E05Leetcode104_1 {
    public int maxDepth(TreeNode node) {
        if (node == null) {
            return 0;
        }
        int i = maxDepth(node.left);
        int j = maxDepth(node.right);
        return Integer.max(i,j)+1;
    }

}
